package de.koller.worlders.gameplay.items;

import de.koller.oceanFramework.gl.util.ParticleTexture;
import de.koller.worlders.WorldersRoot;
import java.util.Objects;

abstract public class Item {
	
	private final ParticleTexture texture;
	private final String title;

	public Item( WorldersRoot wroot, ParticleTexture texture, String title ) {
		this.texture = texture;
		this.title = title;
	}
	
	public ParticleTexture getTexture() {
		return texture;
	}

	public String getTitle() {
		return title;
	}

	public boolean equals( Object obj ) {
		if( obj == null ) {
			return false;
		}
		if( getClass() != obj.getClass() ) {
			return false;
		}
		final Item other = ( Item ) obj;
		if( !Objects.equals( this.title, other.title ) ) {
			return false;
		}
		return true;
	}

	public int hashCode() {
		int hash = 3;
		hash = 41 * hash + Objects.hashCode( this.title );
		return hash;
	}
	
}
